package com.zby.config;

import com.google.common.util.concurrent.RateLimiter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RateLimiterConfig {

    // 每秒允许5次操作（与你的注释要求一致）
    @Bean(name = "likeRateLimiter")
    public RateLimiter likeRateLimiter() {
        return RateLimiter.create(5.0);
    }
}
